package com.xiaoxi.userserver.mapper.user;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xiaoxi.domain.user.BMSUserDetail;
import com.xiaoxi.userserver.domain.dto.user.BMSUserDetailDTO;
import com.xiaoxi.userserver.domain.vo.user.BMSUserDetailVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author xiaoxi
 * @version 1.0
 * @date 2022/5/17 0:06
 */
@Mapper
public interface BMSUserDetailMapper extends BaseMapper<BMSUserDetail> {

    /**
     * 通过分页 查询用户
     *
     * @param bmsUserDetailDTO
     * @param start
     * @param pageSize
     * @return
     */
    List<BMSUserDetailVO> getUserInfoByPage(@Param("bmsUserDetailDTO") BMSUserDetailDTO bmsUserDetailDTO, @Param("start") int start, @Param("pageSize") int pageSize);

    /**
     * 查询用户有多少个，提供给前端分页
     *
     * @param bmsUserDetailDTO
     * @return
     */
    Long getUserInfoByCount(@Param("bmsUserDetailDTO") BMSUserDetailDTO bmsUserDetailDTO);

}
